package com.lzhsite.technology.designPattern.composite.FolderFileImplement;

public class ClientForFolderFileImplement
{
    public static void main(String[] args)
    {
        Root root1 = new Folder("C://");
        Root root2 = new Folder("D://");
        Root winDir = new Folder("Windows/");
        Root sysDir = new Folder("System/");
        Root userDir = new Folder("User/");
        Root defaultDir = new Folder("Default/");
        
        Root helloWorld = new File("HelloWorld.java");
        winDir.addfile(helloWorld);
        
        
        Root helloWorld1 = new File("HelloWorld1.java");
        Root helloWorld2 = new File("HelloWorld2.java");
        sysDir.addfile(helloWorld1);
        sysDir.addfile(helloWorld2);
        root1.addfile(winDir);
        root1.addfile(sysDir);
 

        
        Root HelloWorld3 = new File("HelloWorld3.java");
        Root HelloWorld4 = new File("HelloWorld4.java");
        Root HelloWorld5 = new File("HelloWorld5.java");
        userDir.addfile(defaultDir);
        userDir.addfile(HelloWorld4);
        userDir.addfile(HelloWorld5);
        defaultDir.addfile(HelloWorld3);
        root2.addfile(userDir);
        
        
        root1.display();
        root2.display();
    }
}
